const Koa = require("koa");
const koaBody = require("koa-body");
const Router = require("koa-router");
const koaRouter = require("koa-router");
const koaStatic = require("koa-static");
const db = require("./db.js");
const getGoods = require("./apis/getGoods");
const Login = require("./apis/login");

db.initDB()

const app = new Koa();
const router = new Router();

app.use(
    koaBody({
        multipart: true,
    })
);

router.get("/api/getgoods", getGoods)
router.post("/api/login", Login);

app.use(router.routes());

app.listen(3000)
